﻿using FlexFlow.Model;
using FlexFlow.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FlexFlow.MVC.Controllers
{
    /// <summary>
    /// 表示用户账户控制器
    /// </summary>
    public class UserAccountController : Controller
    {
        /// <summary>
        /// 用户账户主页
        /// </summary>
        /// <returns></returns>
        public ActionResult Login()
        {
            return View();
        }
        /// <summary>
        /// 用户账户编辑页面
        /// </summary>
        /// <param name="uid">
        /// 要编辑的用户ID
        /// </param>
        /// <returns>
        /// 操作结果
        /// </returns>
        public ActionResult Edit(Guid uid)
        {
            OperateResult res = UserManager.Default.Get(uid);
            if(res.ResultCode!=200)
            {
                return Content(res.Message);
            }
            return View(res.Tag);
        }

    }
}
